Skip to content

Conversation

@marcelinollano
Copy link
Collaborator

What does this PR do?

Fixes agent_label and description in generated .agent files always showing hardcoded defaults ("New Agent" and "New agent description") instead of reflecting the user-provided --name flag. The agentSpec argument is now always passed to ScriptAgent.createAuthoringBundle() with name, developerName, and role set from user input, with role falling back to the spec file's value when a spec is provided.

What issues does this PR fix or reference?

@W-21220597@

Functionality Before

Running sf agent generate authoring-bundle --no-spec --name "My Agent" --api-name MyAgent produced:

agent_label: "New Agent"
description: "New agent description"

Functionality After

Running the same command now produces:

agent_label: "My Agent"
description: "My Agent description"

When a spec file with a role field is provided, that value is used for description instead.

Testing Setup Notes

  • Run sf agent generate authoring-bundle --no-spec --name "Test Agent" --api-name TestAgent --target-org <org> and verify the .agent file has agent_label: "Test Agent" and description: "Test Agent description"
  • Run with --spec <path-to-spec> where the spec has a role field, and verify description matches the spec's role
  • NUT tests updated with assertions for agent_label and description in both with-spec and no-spec cases

@WillieRuemmele WillieRuemmele merged commit bea399d into salesforcecli:main Feb 9, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants